package com.alibaba.service;


import com.alibaba.bean.FollowInterface;
import com.alibaba.mapper.FollowInterfaceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FollowInterfaceService {
    @Autowired
    FollowInterfaceMapper followInterfaceMapper;

    public int insert(int toUserId,int userId){
        if(followInterfaceMapper.insert(toUserId,userId)!=0){
            return 1;
        }
        else
            return 0;
    }

    public int delete(int toUserId,int userId){
        if(followInterfaceMapper.delete(toUserId,userId)!=0){
            return 1;
        }
        else return 0;
    }
}
